翻訳と辞書
Words near each other
・ Htra
・ HtrA serine peptidase 2
・ HTRA1
・ Htra2
・ HtrA2 peptidase
・ HTree
・ Htree (disambiguation)
・ HTRK
・ HTS
・ HTS Kimberley
・ HTSC
・ HTSQL
・ HTT
・ HTT Pléthore
・ HTT-AS1
HTTP 301
・ HTTP 302
・ HTTP 303
・ HTTP 403
・ HTTP 404
・ HTTP 451
・ HTTP authentication
・ HTTP compression
・ HTTP cookie
・ HTTP Debugger
・ HTTP ETag
・ HTTP File Server
・ HTTP handler
・ HTTP header injection
・ HTTP Live Streaming


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

HTTP 301 : ウィキペディア英語版
The HTTP response status code 301 Moved Permanently is used for permanent URL redirection, meaning current links or records using the URL that the response is received for should be updated. The new URL should be provided in the Location field included with the response. (RFC 2616 ) states that:* If a client has link-editing capabilities, it should update all references to the Request URL.* The response is cachable.How long do browsers cache HTTP 301s? - http://stackoverflow.com/questions/9130422/how-long-do-browsers-cache-http-301s* Unless the request method was HEAD, the entity should contain a small hypertext note with a hyperlink to the new URL(s).* If the 301 status code is received in response to a request of any type other than GET or HEAD, the client must ask the user before redirecting.==Example==Client request:GET /index.php HTTP/1.1Host: www.example.orgServer response:HTTP/1.1 301 Moved PermanentlyLocation: http://www.example.org/index.aspHere is an example using a htaccess file to redirect to a non www with a SSL attached to the domain.RewriteEngine OnRewriteCond % offRewriteCond % ^www\.(.*)$ ()RewriteRule ^(.*)$ http://%1/$1 ()RewriteCond % onRewriteCond % ^www\.(.*)$ ()RewriteRule ^(.*)$ https://%1/$1 ()RewriteEngine OnRewriteCond % 80RewriteRule ^(.*)$ https://example.com/$1 () Here is an example using a PHP redirect.header("HTTP/1.1 301 Moved Permanently");header("Location: http://example.com/newpage.html");exit();?>Equivalently simple for an nginx configuration.location /old/url/
The HTTP response status code 301 Moved Permanently is used for permanent URL redirection, meaning current links or records using the URL that the response is received for should be updated. The new URL should be provided in the Location field included with the response. (RFC 2616 ) states that:
* If a client has link-editing capabilities, it should update all references to the Request URL.
* The response is cachable.〔How long do browsers cache HTTP 301s? - http://stackoverflow.com/questions/9130422/how-long-do-browsers-cache-http-301s〕
* Unless the request method was HEAD, the entity should contain a small hypertext note with a hyperlink to the new URL(s).
* If the 301 status code is received in response to a request of any type other than GET or HEAD, the client must ask the user before redirecting.
==Example==
Client request:

GET /index.php HTTP/1.1
Host: www.example.org

Server response:

HTTP/1.1 301 Moved Permanently
Location: http://www.example.org/index.asp

Here is an example using a htaccess file to redirect to a non www with a SSL attached to the domain.
RewriteEngine On
RewriteCond % off
RewriteCond % ^www\.(.
*)$ ()
RewriteRule ^(.
*)$ http://%1/$1 ()
RewriteCond % on
RewriteCond % ^www\.(.
*)$ ()
RewriteRule ^(.
*)$ https://%1/$1 ()
RewriteEngine On
RewriteCond % 80
RewriteRule ^(.
*)$ https://example.com/$1 ()

Here is an example using a PHP redirect.
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://example.com/newpage.html");
exit();
?>

Equivalently simple for an nginx configuration.
location /old/url/ 


抄文引用元・出典: フリー百科事典『 Equivalently simple for an nginx configuration.location /old/url/ ">ウィキペディア(Wikipedia)
Equivalently simple for an nginx configuration.location /old/url/ ">ウィキペディアで「 The HTTP response status code 301 Moved Permanently is used for permanent URL redirection, meaning current links or records using the URL that the response is received for should be updated. The new URL should be provided in the Location field included with the response. (RFC 2616 ) states that:* If a client has link-editing capabilities, it should update all references to the Request URL.* The response is cachable.How long do browsers cache HTTP 301s? - http://stackoverflow.com/questions/9130422/how-long-do-browsers-cache-http-301s* Unless the request method was HEAD, the entity should contain a small hypertext note with a hyperlink to the new URL(s).* If the 301 status code is received in response to a request of any type other than GET or HEAD, the client must ask the user before redirecting.==Example==Client request:GET /index.php HTTP/1.1Host: www.example.orgServer response:HTTP/1.1 301 Moved PermanentlyLocation: http://www.example.org/index.aspHere is an example using a htaccess file to redirect to a non www with a SSL attached to the domain.RewriteEngine OnRewriteCond % offRewriteCond % ^www\.(.*)$ ()RewriteRule ^(.*)$ http://%1/$1 ()RewriteCond % onRewriteCond % ^www\.(.*)$ ()RewriteRule ^(.*)$ https://%1/$1 ()RewriteEngine OnRewriteCond % 80RewriteRule ^(.*)$ https://example.com/$1 () Here is an example using a PHP redirect.header("HTTP/1.1 301 Moved Permanently");header("Location: http://example.com/newpage.html");exit();?>Equivalently simple for an nginx configuration.location /old/url/ 」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.